/*
 * @Descripttion: 
 * @version: 
 * @Author: weihua.yao
 * @Date: 2020-03-06 15:53:46
 * @LastEditTime: 2020-05-21 16:51:30
 */ 
// 手动实现一个ajax
let xhr = new XMLHttpRequest();
xhr.open('method', '/url', true);
xhr.onreadystatechange = function () {
  if (xhr.readyState === 4 && xhr.status === 200) {
    console.log(xhr.responseText)
  }
};
if (method === 'POST') {
  xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
}
xhr.send();


//可以跨域的三个标签
// <img src='xxx'>
// <link herf=''>
//   <script src=''>
//存储 cookie ， sessionStorage 和 localStorage的区别

